home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / LZEXPAND.H < prev    next >
C/C++ Source or Header  |  1993-11-23  |  4KB  |  96 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * lzexpand.h    Public interfaces for LZEXPAND.DLL.                           *
  4. *                                                                             *
  5. *               Version 3.10                                                  *
  6. *                                                                             *
  7. *               NOTE: windows.h must be included first if LIB is NOT #defined *
  8. *                                                                             *
  9. *               Copyright (c) 1992, Microsoft Corp.  All rights reserved.     *
  10. *                                                                             *
  11. *******************************************************************************
  12. *
  13. * #define LIB   - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL)
  14. *                 NOTE: Not compatible with windows.h if LIB is #defined
  15. *
  16. \*****************************************************************************/
  17.  
  18. #ifndef _INC_LZEXPAND
  19. #define _INC_LZEXPAND
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {            /* Assume C declarations for C++ */
  23. #endif    /* __cplusplus */
  24.  
  25. /*
  26.  * If .lib version is being used, declare types used in this file.
  27.  */
  28. #ifdef LIB
  29.  
  30. #define LZAPI       _pascal
  31.  
  32. #ifndef WINAPI                      /* don't declare if they're already declared */
  33. #define WINAPI      _far _pascal
  34. #define NEAR        _near
  35. #define FAR         _far
  36. #define PASCAL      _pascal
  37. typedef int             BOOL;
  38. #define TRUE        1
  39. #define FALSE       0
  40. typedef unsigned char   BYTE;
  41. typedef unsigned short  WORD;
  42. typedef unsigned int    UINT;
  43. typedef signed long     LONG;
  44. typedef unsigned long   DWORD;
  45. typedef char far*       LPSTR;
  46. typedef const char far* LPCSTR;
  47. typedef int             HFILE;
  48. #define OFSTRUCT    void            /* Not used by the .lib version */
  49. #endif  /* WINAPI */
  50.  
  51. #else   /* LIB */
  52.  
  53. #define LZAPI       _far _pascal
  54.  
  55. /* If .dll version is being used and we're being included with
  56.  * the 3.0 windows.h, #define compatible type aliases.
  57.  * If included with the 3.0 windows.h, #define compatible aliases
  58.  */
  59. #ifndef _INC_WINDOWS
  60. #define UINT        WORD
  61. #define LPCSTR      LPSTR
  62. #define HFILE       int
  63. #endif  /* !_INC_WINDOWS */
  64.  
  65. #endif  /* !LIB */
  66.  
  67. /****** Error return codes ***************************************************/
  68.  
  69. #define LZERROR_BADINHANDLE   (-1)  /* invalid input handle */
  70. #define LZERROR_BADOUTHANDLE  (-2)  /* invalid output handle */
  71. #define LZERROR_READ          (-3)  /* corrupt compressed file format */
  72. #define LZERROR_WRITE         (-4)  /* out of space for output file */
  73. #define LZERROR_GLOBALLOC     (-5)  /* insufficient memory for LZFile struct */
  74. #define LZERROR_GLOBLOCK      (-6)  /* bad global handle */
  75. #define LZERROR_BADVALUE      (-7)  /* input parameter out of range */
  76. #define LZERROR_UNKNOWNALG    (-8)  /* compression algorithm not recognized */
  77.  
  78. /****** Public functions *****************************************************/
  79.  
  80. int     LZAPI LZStart(void);
  81. void    LZAPI LZDone(void);
  82. LONG    LZAPI CopyLZFile(HFILE, HFILE);
  83. LONG    LZAPI LZCopy(HFILE, HFILE);
  84. HFILE   LZAPI LZInit(HFILE);
  85. int     LZAPI GetExpandedName(LPCSTR, LPSTR);
  86. HFILE   LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT);
  87. LONG    LZAPI LZSeek(HFILE, LONG, int);
  88. int     LZAPI LZRead(HFILE, void FAR*, int);
  89. void    LZAPI LZClose(HFILE);
  90.  
  91. #ifdef __cplusplus
  92. }
  93. #endif    /* __cplusplus */
  94.  
  95. #endif  /* _INC_LZEXPAND */
  96.